/*
 * ASTFunctionDeclaration.java - ScriptME
 * 
 * Copyright (c) 2009 Cesar Henriques <cesar at alttab.com.ar>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Based on FESI Project
 * 
 * Contributors:
 * 	Jean-Marc Lugrin - initial API and implementation
 * 	Cesar Henriques <cesar at alttab.com.ar> - J2ME Porting and Extensions
 */
/*
 * 
 */

package org.scriptme.ecmascript.ast;

import org.scriptme.ecmascript.parser.EcmaScript;

// TODO: Auto-generated Javadoc
/**
 * The Class ASTFunctionDeclaration.
 */
public class ASTFunctionDeclaration extends SimpleNode {

	/** The source string. */
	private String sourceString = null;

	/**
	 * Instantiates a new aST function declaration.
	 * 
	 * @param id
	 *            the id
	 */
	public ASTFunctionDeclaration(int id) {
		super(id);
	}

	/**
	 * Instantiates a new aST function declaration.
	 * 
	 * @param p
	 *            the p
	 * @param id
	 *            the id
	 */
	public ASTFunctionDeclaration(EcmaScript p, int id) {
		super(p, id);
	}

	/**
	 * Jjt create.
	 * 
	 * @param id
	 *            the id
	 * 
	 * @return the node
	 */
	public static Node jjtCreate(int id) {
		return new ASTFunctionDeclaration(id);
	}

	/**
	 * Jjt create.
	 * 
	 * @param p
	 *            the p
	 * @param id
	 *            the id
	 * 
	 * @return the node
	 */
	public static Node jjtCreate(EcmaScript p, int id) {
		return new ASTFunctionDeclaration(p, id);
	}

	/**
	 * Accept the visitor. *
	 * 
	 * @param visitor
	 *            the visitor
	 * @param data
	 *            the data
	 * 
	 * @return the object
	 */
	public Object jjtAccept(EcmaScriptVisitor visitor, Object data) {
		return visitor.visit(this, data);
	}

	/**
	 * Sets the source string.
	 * 
	 * @param sourceString
	 *            the new source string
	 */
	public void setSourceString(String sourceString) {
		this.sourceString = sourceString;
	}

	/**
	 * Gets the source string.
	 * 
	 * @return the source string
	 */
	public String getSourceString() {
		return sourceString;
	}
}
